package com.ruoyi.system.domain;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.ruoyi.system.domain.dto.SignatoryDTO;
import com.tencentcloudapi.essbasic.v20210526.models.FormField;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.NotNull;
import java.util.Date;
import java.util.List;

/**
 * 股东合同管理对象 gw_contract
 *
 * @author ruoyi
 * @date 2025-04-23
 */
public class GwContract extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** ID */
    private Long id;

    /** 合同名称 */
    @Excel(name = "合同名称")
    @NotNull(message = "合同名称必填，限输入100个字符")
    @Length(max=100, message = "合同名称必填，限输入100个字符")
    private String contractName;

    /** 所属公司 */
    @Excel(name = "所属公司")
    private String companyId;

    /** 合同文件 */
    @Excel(name = "合同文件")
    //@NotNull(message = "合同文件只能上传一个文件")
    private String contractUrl;

    /** 合同类型 */
    @Excel(name = "合同类型")
    @NotNull(message = "合同类型不能为空")
    private String contractType;

    /** 发起方式 */
    @Excel(name = "发起方式")
    private String initiationMethod;

    /** 模板类型 */
    @Excel(name = "模板类型")
    private String templateType;

    /** 开始日期 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    private Date startDate;

    /** 结束日期 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    private Date endDate;

    /** 合同ID */
    @Excel(name = "合同ID")
    private String contractId;

    /** 是否历史 */
    @Excel(name = "是否历史")
    private String izHistory;

    //private String izZt = "否";

    /** 签署链接 */
    private String signLink;

    /** 下载地址 */
    private String pdfUrl;

    /** 合同状态 */
    private String status;

    /** 合同状态 */
    @Excel(name = "合同状态")
    private String statusName;

    /** 删除标识 */
    private String delFlag;

    /** 人员ID，','分割 */
    private String userIds;

//    private String initiator = "甲方";
//    private List<SignatoryDTO> signatoryDTOList;

    /** 撤销原因 */
    private String cancelMessage;

    private String previewFlowUrl;

    private String prepareFlowUrl;

    private String signUser;
    private String unSignUser;

    /** 来自哪里 PC、APP */
    private String from = "PC";

    /** 姓名 */
    private String userName;
    /** 手机号 */
    private String phoneNumber;

    private FormField[] formFields;

    public void setId(Long id)
    {
        this.id = id;
    }

    public Long getId()
    {
        return id;
    }

    public void setContractName(String contractName)
    {
        this.contractName = contractName;
    }

    public String getContractName()
    {
        return contractName;
    }

    public void setCompanyId(String companyId)
    {
        this.companyId = companyId;
    }

    public String getCompanyId()
    {
        return companyId;
    }

    public void setContractUrl(String contractUrl)
    {
        this.contractUrl = contractUrl;
    }

    public String getContractUrl()
    {
        return contractUrl;
    }

    public void setContractType(String contractType)
    {
        this.contractType = contractType;
    }

    public String getContractType()
    {
        return contractType;
    }

    public void setContractId(String contractId)
    {
        this.contractId = contractId;
    }

    public String getContractId()
    {
        return contractId;
    }

    public void setSignLink(String signLink)
    {
        this.signLink = signLink;
    }

    public String getSignLink()
    {
        return signLink;
    }

    public void setPdfUrl(String pdfUrl)
    {
        this.pdfUrl = pdfUrl;
    }

    public String getPdfUrl()
    {
        return pdfUrl;
    }

    public void setStatus(String status)
    {
        this.status = status;
    }

    public String getStatus()
    {
        return status;
    }

    public void setDelFlag(String delFlag)
    {
        this.delFlag = delFlag;
    }

    public String getDelFlag()
    {
        return delFlag;
    }

    public String getUserIds() {
        return userIds;
    }

    public void setUserIds(String userIds) {
        this.userIds = userIds;
    }

    public String getCancelMessage() {
        return cancelMessage;
    }

    public void setCancelMessage(String cancelMessage) {
        this.cancelMessage = cancelMessage;
    }

    public String getInitiationMethod() {
        return initiationMethod;
    }

    public void setInitiationMethod(String initiationMethod) {
        this.initiationMethod = initiationMethod;
    }

    public Date getStartDate() {
        return startDate;
    }

    public void setStartDate(Date startDate) {
        this.startDate = startDate;
    }

    public Date getEndDate() {
        return endDate;
    }

    public void setEndDate(Date endDate) {
        this.endDate = endDate;
    }

    public String getIzHistory() {
        return izHistory;
    }

    public void setIzHistory(String izHistory) {
        this.izHistory = izHistory;
    }

//    public String getIzZt() {
//        return izZt;
//    }
//
//    public void setIzZt(String izZt) {
//        this.izZt = izZt;
//    }

    public String getSignUser() {
        return signUser;
    }

    public void setSignUser(String signUser) {
        this.signUser = signUser;
    }

    public String getUnSignUser() {
        return unSignUser;
    }

    public void setUnSignUser(String unSignUser) {
        this.unSignUser = unSignUser;
    }

    public String getTemplateType() {
        return templateType;
    }

    public void setTemplateType(String templateType) {
        this.templateType = templateType;
    }

    public FormField[] getFormFields() {
        return formFields;
    }

    public void setFormFields(FormField[] formFields) {
        this.formFields = formFields;
    }

    public String getStatusName() {
        return statusName;
    }

    public void setStatusName(String statusName) {
        this.statusName = statusName;
    }

    public String getUserName() {
        return userName;
    }

    public void setUserName(String userName) {
        this.userName = userName;
    }

    public String getPhoneNumber() {
        return phoneNumber;
    }

    public void setPhoneNumber(String phoneNumber) {
        this.phoneNumber = phoneNumber;
    }

    public String getPreviewFlowUrl() {
        return previewFlowUrl;
    }

    public void setPreviewFlowUrl(String previewFlowUrl) {
        this.previewFlowUrl = previewFlowUrl;
    }

    public String getPrepareFlowUrl() {
        return prepareFlowUrl;
    }

    public void setPrepareFlowUrl(String prepareFlowUrl) {
        this.prepareFlowUrl = prepareFlowUrl;
    }

    public String getFrom() {
        return from;
    }

    public void setFrom(String from) {
        this.from = from;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("id", getId())
            .append("from", getFrom())
            .append("previewFlowUrl", getPreviewFlowUrl())
            .append("prepareFlowUrl", getPrepareFlowUrl())
            .append("userName", getUserName())
            .append("phoneNumber", getPhoneNumber())
            .append("formFields", getFormFields())
            .append("statusName", getStatusName())
            .append("userIds", getUserIds())
            .append("signUser", getSignUser())
            .append("unSignUser", getUnSignUser())
            .append("izHistory", getIzHistory())
            //.append("izZt", getIzZt())
            .append("initiationMethod", getInitiationMethod())
            .append("templateType", getTemplateType())
            .append("startDate", getStartDate())
            .append("endDate", getEndDate())
            .append("cancelMessage", getUserIds())
            .append("contractName", getCancelMessage())
            .append("companyId", getCompanyId())
            .append("contractUrl", getContractUrl())
            .append("contractType", getContractType())
            .append("contractId", getContractId())
            .append("signLink", getSignLink())
            .append("pdfUrl", getPdfUrl())
            .append("status", getStatus())
            .append("delFlag", getDelFlag())
            .append("createBy", getCreateBy())
            .append("createTime", getCreateTime())
            .append("updateBy", getUpdateBy())
            .append("updateTime", getUpdateTime())
            .append("remark", getRemark())
            .toString();
    }
}
